home *** CD-ROM | disk | FTP | other *** search
- ;
- ; $VER: Install_Visage 39.3 (3.12.95)
- ;
- ; Installer script for Visage.
- ;
-
- ; Get current language (no need for lots of silly icons! ;). However, this
- ; won't properly work for all versions of the Installer. Some doesn't
- ; understand the language "default". :/
-
- (if (= (exists "Env:Language") 1)
- ; GetEnv reports "String too long" if the variable doesn't exist! :(
- (set @language (getenv "language"))
- )
-
- ;**************************************************************************
- ;
- ; English strings
- ;
-
- ; .ct
- (set default-lang 2)
-
- (set #bad-kick
- "You must have AmigaOS Release 3.0 or newer to use Visage."
- )
-
- (set #welcome
- (cat
- "\n\n\nWelcome to the Visage installation utility.\n\n"
- "This program lets you install Visage on your Amiga.\n\n\n"
- "Visage © 1995 Magnus Holmgren."
- )
- )
-
- (set #install-parts "Please select the parts you wish to install")
-
- (set #item-visage "Visage")
-
- (set #item-visage-guide "Visage.guide")
-
- (set #item-locale "Translations")
-
- (set #item-codec "JPEG codec")
-
- (set #item-getmodeid "GetModeID")
-
- (set #item-kill "Kill")
-
- (set #item-makelink "MakeLink")
-
- (set #item-unpackilbm "UnpackILBM")
-
- (set #install-parts-help
- (cat
- " Here you select the different parts of Visage that you would like to "
- "install. After that, you select the details of the installation (such as "
- "where the different files should be installed). You may choose to install "
- "the following items:\n"
- " Visage: The actual picture viewer.\n"
- " Visage.guide: The manual, in AmigaGuide® format. If you install it "
- "using the installer, the text will reflow to fit the current window size. "
- "If you do a manual installation, the text is fixed to 76 columns.\n"
- " Translations: If you install a translation, then Visage can operate in "
- "the language(s) you select.\n"
- " JPEG codec: The Tower JPEG Codec Class, which Visage needs to be able "
- "to view JPEG pictures (without using datatypes).\n"
- " GetModeID: A program that shows a screen mode requester, and prints "
- "a decimal number that represents the selected screen mode.\n"
- " Kill: A program that can stop another program (sending \"break\" "
- "signals). Similar to Break.\n"
- " MakeLink: A replacement for the MakeLink command that supports "
- "soft links.\n"
- " UnpackILBM: A program that unpacks the picture data in an IFF ILBM "
- "picture (the BODY chunk).\n"
- " For more information about these parts, please read the manual.\n"
- )
- )
-
- (set #where-visage "Where would you like to install Visage?")
-
- (set #where-visage-guide "Where would you like to install Visage.guide?")
-
- (set #copy-guide-icon "Should I copy the icon for Visage.guide?")
-
- (set #convert-guide "Converting Visage.guide...")
-
- (set #which-language "Which languages should be installed?")
-
- (set #which-language-help
- (cat
- " The Amiga can be operated in many different languages. If you "
- "want Visage to use the same language as your Amiga Workbench, "
- "then a couple of catalog files must be copied to your harddisk "
- "for each language supported.\n"
- " To reduce the amount of space consumed by the language files, "
- "you can select to have only the files of specific languages "
- "copied.\n"
- " Simply check the boxes of the languages you wish to have have "
- "available on your system.\n"
- )
- )
-
- (set #where-tools "Where would you like to install the extra programs?")
-
- (set #where-tools-help
- (cat
- " Here you specify where the programs GetModeID, Kill and UnpackILBM "
- "will be installed. Only the programs you selected will be copied. Since "
- "these programs are Shell-only, the default location is C:, where the "
- "systems Shell-only programs can be found.\n"
- " It is recommended that you install these programs somewhere in "
- "your command search path.\n"
- )
- )
-
- (set #copy "Copying %s to %s...")
-
- (set #program-update "How do you want to update the tooltypes in the icon?")
-
- (set #update-none "No update")
-
- (set #update-all "Add all")
-
- (set #update-since "Add new since %s")
-
- (set #program-update-help
- (cat
- " Since this installation updated an older version of Visage, "
- "the icon have not been copied over. This to maintain any changes "
- "you may have made to it. However, new tooltypes may have been added. "
- "Here you can decide if you want to:\n"
- " No update: Skip this part.\n"
- " Add all tooltypes: existing tooltypes will not be changed "
- "Any tooltypes you may have removed will be added again. The new "
- "tooltypes will be added as well.\n "
- " Add new since 39.x: Only add the new tooltypes since that version. "
- "Any existing tooltype not be changed.\n"
- )
- )
-
- ; JPEG codec
-
- (set #codec-message
- (cat
- "\n\n\nTower JPEG Codec Class\n\nCopyright © 1994 Christoph Feck, TowerSystems\n"
- "All Rights Reserved.\n\n\n\n"
- "Please refer to the documentation for details."
- )
- )
-
- (set #jpeg-tmp-prompt
- "Select a directory for temporary files, not in RAM:"
- )
-
- (set #temp-file
- (cat
- " To decode certain JPEG images, the Codec needs a large amount of memory.\n"
- "If the required storage is not available in main memory, the Codec will "
- "create a temporary file on your harddisk. The volume on which this file is "
- "created should have enough free space (about 4 meg).\n"
- " A temporary file is usually only required, if you want to quantize "
- "JPEG images to 256 colors.\n\n"
- @askdir-help
- )
- )
-
- (set #jpeg-startup-prompt
- "An assignment has to be added to your user-startup."
- )
-
- (set #make-assign
- (cat
- " The logical assignment \"JPEGTMP:\" is used to refer to the temporary "
- "directory.\n"
- " In order to make this assignment available on every reboot, an "
- "\"Assign\" command has to be added to your \"user-startup\" file.\n\n"
- @startup-help
- )
- )
-
- (set #jpeg-copy "Copying %s...")
-
-
- ;**************************************************************************
- ;
- ; German strings
- ;
-
- ; .ct
- (if (= @language "deutsch")
- (
- (set default-lang 1)
- )
- )
-
-
- ;**************************************************************************
- ;
- ; French strings
- ;
-
- ; .ct
- (if (= @language "francais")
- (
- (set default-lang 4)
- )
- )
-
-
- ;**************************************************************************
- ;
- ; Italian strings
- ;
-
- ; .ct
- (if (= @language "italiano")
- (
- (set default-lang 8)
- )
- )
-
-
- ;**************************************************************************
- ;
- ; Norwegian strings
- ;
-
- ; .ct
- (if (= @language "norsk")
- (
- (set default-lang 16)
- )
- )
-
-
- ;**************************************************************************
- ;
- ; Finnish strings
- ;
-
- ; .ct
- (if (= @language "suomi")
- (
- (set default-lang 32)
- )
- )
-
-
- ;**************************************************************************
- ;
- ; Swedish strings
- ;
-
- ; .ct
- (if (= @language "svenska")
- (
- (set default-lang 64)
-
- (set #bad-kick
- "Du måste ha AmigaOS version 3 eller nyare för att kunna använda Visage."
- )
-
- (set #welcome
- (cat
- "\n\n\nVälkommen till Installeraren.\n\n"
- "Det här programmet låter dig installera Visage i din Amiga.\n\n\n"
- "Visage © 1995 Magnus Holmgren."
- )
- )
-
- (set #install-parts "Välj de delar du vill installera:")
-
- (set #item-visage "Visage")
-
- (set #item-visage-guide "Visage.guide")
-
- (set #item-locale "Översättningar")
-
- (set #item-codec "JPEG codec")
-
- (set #install-parts-help
- (cat
- " Här väljer du de olika delar av Visage som du vill installera. "
- "Efter det anger du detaljer om installationen (såsom var de olika "
- "filerna ska installeras). Du kan välja mellan följande delar:\n"
- " Visage: Själva bildvisaren.\n"
- " Visage.guide: Manualen, i AmigaGuide®-format. Om du installerar "
- "den med Installeraren, så kommer texten att formateras om efter "
- "fönstrets aktuella storlek. Om du installerar den manuellt, så "
- "är texten fixerad vid 76 kolumner.\n"
- " Översättningar: Om du installerar en översättning, så kan "
- "Visage använda det språket.\n"
- " JPEG codec: \"The Tower JPEG Codec Class\". Visage behöver "
- "den här för att kunna visa JPEG-bilder.\n"
- " GetModeID: Ett program som visar en skärmlägesväljare, och "
- "sedan skriver ut ett decimalt tal som motsvarar det valda "
- "skärmläget.\n"
- " Kill: Ett program som kan stoppa andra program (genom att "
- "skicka \"break\"-signaler). Liknar Break.\n"
- " UnpackILBM: Ett program som packar upp bilddatan i en IFF ILBM "
- "bild (BODY \"chunken\").\n"
- " För mer information om de här sakerna, se manualen.\n"
- )
- )
-
- (set #where-visage "Var vill du installera Visage?")
-
- (set #where-visage-guide "Var vill du installera Visage.guide?")
-
- (set #copy-guide-icon "Ska jag kopiera ikonen för Visage.guide?")
-
- (set #convert-guide "Konverterar Visage.guide...")
-
- (set #which-language "Vilka språk ska installeras?")
-
- (set #which-language-help
- (cat
- " Amigan kan arbeta med flera olika språk. Om du vill att "
- "Visage ska använda samma språk som Amiga Workbench så "
- "måste en så kallad katalogfil kopieras till din systemdisk "
- "för varje språk.\n"
- " För att minimera diskutrymmet för språkfiler kan du välja "
- "att bara installera filerna för vissa språk.\n"
- " Markera bara rutorna för de språk du önskar installera i "
- "din dator.\n"
- )
- )
-
- (set #where-tools "Var vill du installera de extra programmen?")
-
- (set #where-tools-help
- (cat
- " Här anger du var programmen GetModeID, Kill och UnpackILBM "
- "ska installeras någonstans. Bara de program som du valde "
- "tidigare kommer att kopieras. Eftersom de här programmen bara "
- "kan användas från ett skal, så är den förvalda destinationen C:, "
- "eftersom systemets \"skalprogram\" finns där. Det rekommenderas "
- "att du installerar dessa program någonstans i sökvägen för "
- "kommandon.\n"
- )
- )
-
- (set #copy "Kopierar %s till %s...")
-
- (set #program-update "Hur vill du uppdatera verktygstyperna i ikonen?")
-
- (set #update-none "Uppdatera inte")
-
- (set #update-all "Lägg till alla")
-
- (set #update-since "Lägg till nya sedan %s")
-
- (set #program-update-help
- (cat
- " Eftersom den här installationen uppdaterade än gammal version "
- "av Visage, så har ikonen inte kopierats. Detta för att bibehålla "
- "eventuella ändringar som du kan ha gjort. Men nya verktygstyper kan "
- "ha tillkommit. Här kan du avgöra vad du vill göra:\n"
- " Uppdatera inte: Hoppa över detta.\n"
- " Lägg till alla: Lägg till alla verktygstyper. Existerande "
- "verktygstyper kommer inte att ändras.\n"
- " Lägg till nya sedan 39.x: Lägg bara till de nya "
- "verktytstyperna. Eventuella existerande verktygstyper "
- "kommer inte att ändras.\n"
- )
- )
-
- ; JPEG codec
-
- (set #temp-file
- (cat
- " För att packa upp vissa JPEG-bilder, så behöver Codec:en "
- "mycket minne.\n"
- " Om det inte finns nog med plats i huvudminnet, så kommer "
- "Codec:en att skapa en temporärfil på din hårddisk. Volymen "
- "på vilken den här filen skapas bör ha tillräcklikt med fritt "
- "utrymme (ungefär 4 MB).\n"
- " En temporärfil behövs normalt sett bara om du vill "
- "kvantisera JPEG-bilder till 256 färger.\n\n"
- @askdir-help
- )
- )
-
- (set #make-assign
- (cat
- " Den logiska tilldelningen \"JPEGTMP:\" används för att "
- "referera till lådan för temporära filer.\n"
- " För att göra den här tilldelningen tillgänglig vid varje "
- "systemstart så behöver ett \"Assign\"-kommando läggas till "
- "i din \"user-startup\"-fil.\n\n"
- @startup-help
- )
- )
-
- (set #codec-message
- (cat
- "\n\n\nTower JPEG Codec Class\n\n"
- "Upphovsrätt © 1994 Christoph Feck, TowerSystems\n"
- "Alla rättigheter reserverade.\n\n\n\n"
- "Var god läs dokumentationen för detaljer."
- )
- )
-
- (set #jpeg-tmp-prompt
- "Välj en låda för temporära filer, inte i RAM:"
- )
-
- (set #jpeg-startup-prompt
- "En tilldelning måste läggas till i din user-startup."
- )
-
- (set #jpeg-copy "Kopierar %s...")
- )
- )
-
- ;**************************************************************************
- ;
- ; The actual installaion script
- ;
-
- ; Check Kickstart version. Exit if not at least 3.0
- (if (< (/ (getversion) 65536) 39)
- (abort #bad-kick)
- )
-
- ; Set to true if we did an update (old Visage.info found)
- (set update 0)
-
- ; Since files probably are scatter installed, don't mention any specific location.
- (set @default-dest "")
-
- ; Version of old program. This means no old program.
- (set visagever 0)
- (set visagerev 0)
-
- ; Greetings Mr. Falken...
- (message #welcome)
-
- (welcome)
-
- ; Ask the user what to install
- (set install-files
- (askoptions
- (prompt #install-parts)
- (help #install-parts-help "\n" @askoptions-help)
- (choices
- #item-visage
- #item-visage-guide
- #item-locale
- #item-codec
- #item-getmodeid
- #item-kill
- #item-makelink
- #item-unpackilbm
- )
- (default (if (= @user-level 2) 255 15))
- )
- )
-
- ; Ask the user for the location of all parts
- (if (BITAND install-files 1)
- (set visage-dest
- (askdir
- (prompt #where-visage)
- (help @askdir-help)
- (default "Sys:Utilities")
- )
- )
- )
-
- (if (BITAND install-files 2)
- (
- (set guide-dest visage-dest)
-
- (if (exists "Help:")
- (set guide-dest "Help:")
- )
-
- (set guide-dest
- (askdir
- (prompt #where-visage-guide)
- (help @askdir-help)
- (default guide-dest)
- )
- )
-
- (set dest-guide-name (tackon guide-dest "Visage.guide.info"))
-
- (set copy-guide-icon
- (if (AND (= @user-level 2 ) (= (exists dest-guide-name) 0))
- (askbool
- (prompt #copy-guide-icon)
- (help " ")
- )
- 1
- )
- )
- )
- )
-
- (set languages 0)
-
- ; .ct
- (if (BITAND install-files 4)
- (set lang
- (askoptions
- (prompt #which-language)
- (help #which-language-help "\n" @askoptions-help)
- (choices
- "Deutsch"
- "English"
- "Français"
- "Italiano"
- "Norsk"
- "Suomi"
- "Svenska"
- )
- (default default-lang)
- )
- )
- )
-
- (if (BITAND install-files 240) ; 16 + 32 + 64 + 128
- (set tool-dest
- (askdir
- (prompt #where-tools)
- (help #where-tools-help "\n" @askdir-help)
- (default "C:")
- )
- )
- )
-
- ; And now do the actual installation
-
- (complete 0)
-
- (if (BITAND install-files 1)
- (
- ; Get the version of previously installed Visage
- (if (= (exists (tackon visage-dest "Visage")) 1)
- (
- (set vernum (getversion (tackon visage-dest "Visage")))
- (set visagever (/ vernum 65536))
- (set visagerev (- vernum (* visagever 65536)))
-
- (if (<= visagever 38)
- (
- (set visagever 39)
- (set visagerev 0)
- )
- )
- )
- )
-
- (copylib
- (prompt (#copy "Visage" visage-dest))
- (source "Visage")
- (dest visage-dest)
- )
-
- (if (= (exists (tackon visage-dest "Visage.info")) 0)
- (copyfiles
- (source "Visage.info")
- (dest visage-dest)
- )
- (set update 1)
- )
- )
- )
-
- (complete 20)
-
- (if (BITAND install-files 2)
- (
- (working #convert-guide)
-
- (run "C/FixAG Visage.guide T:Visage.Guide")
-
- (copylib
- (prompt (#copy "Visage.guide" guide-dest))
- (source "T:Visage.guide")
- (dest guide-dest)
- )
-
- (delete "T:Visage.guide" (safe))
-
- (if copy-guide-icon
- (copyfiles
- (source "Visage.guide.info")
- (dest guide-dest)
- )
- )
- )
- )
-
- (complete 40)
-
- ; .ct
- (if (BITAND install-files 4)
- (
- (set n 0)
-
- (while
- (set language
- (select n
- "Deutsch"
- "English"
- "Français"
- "Italiano"
- "Norsk"
- "Suomi"
- "Svenska"
- ""
- )
- )
-
- (
- (if (AND (IN lang n) (<> 0 n))
- (
- (set catalog
- (tackon "Catalogs"
- (tackon language "visage.catalog")
- )
- )
-
- (set destination (tackon "Locale:Catalogs" language))
-
- (copylib
- (prompt (#copy catalog destination))
- (source catalog)
- (dest destination)
- )
- )
- )
-
- (set n (+ n 1))
- )
- )
- )
- )
-
- (complete 45)
-
- (if (BITAND install-files 16)
- (copylib
- (prompt (#copy "GetModeID" tool-dest))
- (source "C/GetModeID")
- (dest tool-dest)
- )
- )
-
- (if (BITAND install-files 32)
- (copylib
- (prompt (#copy "Kill" tool-dest))
- (source "C/Kill")
- (dest tool-dest)
- )
- )
-
- (if (BITAND install-files 64)
- (copylib
- (prompt (#copy "MakeLink" tool-dest))
- (source "C/MakeLink")
- (dest tool-dest)
- )
- )
-
- (if (BITAND install-files 128)
- (copylib
- (prompt (#copy "UnpackILBM" tool-dest))
- (source "C/UnpackILBM")
- (dest tool-dest)
- )
- )
-
- (complete 50)
-
- ; JPEG codec installation
-
- (if (BITAND install-files 8)
- (
- ;****************************************************************************
- ;
- ; Setup
- ;
-
- (set libs-dest "LIBS:")
- (set class-dest "SYS:Classes")
-
- (if (not (exists class-dest))
- (set class-dest "LIBS:")
- )
-
- ;****************************************************************************
- ;
- ; Welcome
- ;
-
- (message #codec-message)
-
- ;****************************************************************************
- ;
- ; JPEGTMP: assignment
- ;
-
- (set has-temp 0)
-
- (if (exists "JPEGTMP:" (noreq))
- (
- (set has-temp 1)
- (if (= "RAM" (getdevice "JPEGTMP:"))
- (set has-temp 0)
- )
- )
- )
-
- (if (= has-temp 0)
- (
- (set jpeg-tmp (askdir (help #temp-file) (prompt #jpeg-tmp-prompt) (default "SYS:")))
- (startup "JPEG Codec"
- (help #make-assign)
- (prompt #jpeg-startup-prompt)
- (command "Assign JPEGTMP: \"" jpeg-tmp "\"")
- )
- (makeassign "JPEGTMP" jpeg-tmp)
- )
- )
-
- (complete 60)
-
- ;****************************************************************************
- ;
- ; Install libraries and classes
- ;
-
- (copylib
- (help @copylib-help)
- (prompt (#jpeg-copy "tower.library"))
- (source "Libs/tower.library")
- (dest libs-dest)
- (confirm)
- )
-
- (complete 70)
-
- (copylib
- (help @copylib-help)
- (prompt (#jpeg-copy "codec.class"))
- (source "Classes/codec.class")
- (dest class-dest)
- (confirm)
- )
-
- (complete 80)
-
- (copylib
- (help @copylib-help)
- (prompt (#jpeg-copy "picture.codec"))
- (source "Classes/Codecs/picture.codec")
- (dest (tackon class-dest "Codecs"))
- (confirm)
- )
-
- (complete 90)
-
- (copylib
- (help @copylib-help)
- (prompt (#jpeg-copy "jpeg.codec"))
- (source "Classes/Codecs/jpeg.codec")
- (dest (tackon class-dest "Codecs"))
- (confirm)
- )
-
- ;****************************************************************************
- ;
- ; Exit
- ;
-
- (run "Avail >Nil: FLUSH")
- )
- )
-
-
- (if (AND update visagever)
- (
- (complete 95)
- (set defaction 0)
-
- (if (= visagerev 0)
- (set defaction 2)
- )
-
- (if (= visagerev 1)
- (set defaction 3)
- )
-
- (if (= visagerev 2)
- (set defaction 4)
- )
-
- (set action
- (askchoice
- (prompt #program-update)
- (choices #update-none
- #update-all
- (#update-since "39.0")
- (#update-since "39.1")
- (#update-since "39.2")
- )
- (default defaction)
- (help #program-update-help "\n" @askchoice-help)
- )
- )
-
- (set tt39-1 "DITHER COMPACT TIME")
- (set tt39-2 "COMMAND CYCLE NOCLICK NORMALNAMES RTG SORT TEST VCENTER")
- (set tt39-3 "INFO SHOWINFO")
-
- ; tackon doesn't seem to work within a "format string". :(
- (set icon-dest (tackon visage-dest "Visage"))
- (set tooltype-pattern
- (select action
- ""
- "#?"
- ("%s %s %s" tt39-3 tt39-2 tt39-1)
- ("%s %s" tt39-3 tt39-2)
- ("%s" tt39-3)
- )
- )
-
- (if (>= action 1)
- (run ("C/UpdateTT Visage %s %s" icon-dest tooltype-pattern))
- )
- )
- )
-
- (complete 100)
-
- (exit)
-